import java.util.Random;

public class VehicleGenerator {

	Random randomGenerator;
	
	public VehicleGenerator(){
		randomGenerator = new Random();
	}
	
	public Vehicle createVehicle(){
				
		switch(randomGenerator.nextInt(3)){
			case 1: return new Bus();
			case 2: return new Car();
			case 3: return new Bicycle();
			default: return null;
		}
	}
	
}
